#ifndef __DctCompression__
#define __DctCompression__

//Systeme include
#include <iostream>
#include <math.h>
#include <iostream>  
#include <fstream> 
#include <stdio.h>
#include <stdlib.h>

#include "RleManager.h"

//OpenCV include
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>

#define Quality 0

class DctCompression
{
public:
    DctCompression(FILE *file, int width = 0, int height = 0, int type = 0);
    ~DctCompression();

    DCT_ENCODED *DCTEncode(cv::Mat &imgYCC);
    cv::Mat DCTUnencode();
    int *DctDequantification(int *dctQ, int *matrixQ);
    int *MatrixQuantification(int Q);
    int *DctQuantification(int *dct, int *matrixQ);

private:
    int DctCompression::Dct(int *block, int *coeff);
    int DctCompression::IDct(int *coeff, int *block);

private:
    RleManager *rle;
    int *matrix;
};
#endif
